This function writes/updates an attribute in a point. If the attribute does not exist, it is created. If it does exist, then the value(s) is (are) updated.
Result = EOS_PT_WRITEATTR( pointID, attrname, datbuf [, COUNT=value] [, HDF_TYPE=value] )
Returns SUCCEED (0) if successful and FAIL (–1) otherwise.
Point id (long) returned by EOS_PT_CREATE or EOS_PT_ATTACH.
Attribute name (string).
Attribute values.
Number of values (long) to store in attribute.
Number type (long) of attribute..
In this example, we write a single precision (32 bit) floating point number with the name “ScalarFloat” and the value 3.14:
f32 = 3.14f
status = EOS_PT_WRITEATTR(pointid, "ScalarFloat", f32)
We can update this value by simply calling the function again with the new value:
f32 = 3.14159
status = EOS_PT_WRITEATTR(pointid, "ScalarFloat", f32)
5.2 |
Introduced |